﻿using Microsoft.EntityFrameworkCore;

namespace EFCoreBooks;

public class StoreDbContext: DbContext
{
    public StoreDbContext(DbContextOptions<StoreDbContext> context): base(context)
    {

    }

    public DbSet<Book> Books { get; set; }

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        base.OnModelCreating(modelBuilder);
        modelBuilder.ApplyConfigurationsFromAssembly(GetType().Assembly);
    }

}
